package com.probiz.estore.common.model.customer.base;

import java.io.Serializable;
import com.probiz.estore.core.model.BaseObject;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;


public class FavoriteTbl extends BaseObject implements Serializable {

    protected Integer favoriteId;
	protected Short type;
	protected Integer itemId;
	protected java.util.Date createTime;
	protected Integer appuserId;


	/**
	 * Default Empty Constructor for class Favorite
	 */
	public FavoriteTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class Favorite
	 */
	public FavoriteTbl (
		 Integer in_favoriteId
        ) {
		this.setFavoriteId(in_favoriteId);
    }
    

	/**
	 * 	 * @return Integer
     * @hibernate.id column="favoriteId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getFavoriteId() {
		return this.favoriteId;
	}
	
	/**
	 * Set the favoriteId
	 */	
	public void setFavoriteId(Integer aValue) {
		this.favoriteId = aValue;
	}	

	public Integer getAppuserId() {
		return appuserId;
	}

	public void setAppuserId(Integer appuserId) {
		this.appuserId = appuserId;
	}

	/**
	 * 收藏物品的类型：1 - 商品; 2 - 供应商; 3 - 采购信息	 * @return Short
	 * @hibernate.property column="type" type="java.lang.Short" length="5" not-null="true" unique="false"
	 */
	public Short getType() {
		return this.type;
	}
	
	/**
	 * Set the type
	 * @spring.validator type="required"
	 */	
	public void setType(Short aValue) {
		this.type = aValue;
	}	

	/**
	 * 	 * @return Integer
	 * @hibernate.property column="itemId" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getItemId() {
		return this.itemId;
	}
	
	/**
	 * Set the itemId
	 */	
	public void setItemId(Integer aValue) {
		this.itemId = aValue;
	}	

	/**
	 * 	 * @return java.util.Date
	 * @hibernate.property column="createTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * Set the createTime
	 * @spring.validator type="required"
	 */	
	public void setCreateTime(java.util.Date aValue) {
		this.createTime = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof FavoriteTbl)) {
			return false;
		}
		FavoriteTbl rhs = (FavoriteTbl) object;
		return new EqualsBuilder()
				.append(this.favoriteId, rhs.favoriteId)
				.append(this.type, rhs.type)
				.append(this.itemId, rhs.itemId)
				.append(this.createTime, rhs.createTime)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.favoriteId) 
				.append(this.type) 
				.append(this.itemId) 
				.append(this.createTime) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("favoriteId", this.favoriteId) 
				.append("type", this.type) 
				.append("itemId", this.itemId) 
				.append("createTime", this.createTime) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "favoriteId";
	}
	
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return favoriteId;
	}

}